package com.homework.collections;

import java.util.HashMap;

public class Database {
  private String id;
  private student st;
  private HashMap<String, student> db = new HashMap<>();
  

  public Database() {
  }

  public void insert(String id, student st) {
    db.put(id, st);
  }

  public void delete(String id) {
    db.remove(id);
  }

  public void update(String id, student st) {
    db.replace(id, st);
  }

  public student search(String id) {
    return db.get(id);
  }

  @Override
  public String toString() {
    return "Database{" +
            "db=" + db +
            '}';
  }
}
